home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / dstr_i.doc < prev    next >
Text File  |  1986-09-23  |  961b  |  39 lines

  1.  
  2.  
  3.  
  4.         NAME
  5.                 dstr_i -- make an ascii decimal string into an integer
  6.  
  7.         SYNOPSIS
  8.                 c = dstr_i(p, r);
  9.                 char *p;
  10.                 int *r;
  11.                 int c;
  12.  
  13.  
  14.         DESCRIPTION
  15.         Read a string of ascii decimal digits and create an integer
  16.         from the result.  String must begin with a digit, +, or -.
  17.         Calculation proceeds to first non-ascii digit or NULL terminator.
  18.         Count of actual digits read is returned, and integer is placed
  19.         in specified destination.  '-' sign as first character returns
  20.         integer negated.
  21.  
  22.  
  23.         EXAMPLE
  24.  
  25.                char string[] = "1357";
  26.                int result;
  27.                int count;
  28.                count = dstr_i(string, &result);
  29.                  count will equal 4
  30.                  result will equal 1357
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler
  39.